﻿<%@ Page Title="Strategic Asset Management Las Vegas: Document Management" Language="C#" MasterPageFile="~/Site2.Master" AutoEventWireup="true" CodeBehind="DocumentFolderList.aspx.cs" Inherits="LenderClearingHouse.DocumentFolderList" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphPageHeader" runat="server">
    Document Management
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cphMain" runat="server">

        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="grid">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="grid" UpdatePanelHeight="" />
                        <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" UpdatePanelHeight="" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>

        <asp:SqlDataSource ID="SqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:SQLConnection %>"
            SelectCommand="getDocumentFolder" SelectCommandType="StoredProcedure" 
            DeleteCommand="deleteDocumentFolder" DeleteCommandType="StoredProcedure">
        <DeleteParameters>
          <asp:Parameter Name="FolderId" Type="Int32" />
        </DeleteParameters>
        </asp:SqlDataSource>

    <div class="panel7">
        <telerik:RadGrid ID="grid" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource" Width="1160px"
            AllowAutomaticDeletes="True" AllowFilteringByColumn="True" 
            AllowPaging="True" AllowSorting="True" 
            PageSize="10" ShowFooter="True" ShowStatusBar="True" 
            oninsertcommand="grid_InsertCommand" onupdatecommand="grid_UpdateCommand" 
            onitemdatabound="grid_ItemDataBound" onitemcommand="grid_ItemCommand">
            <GroupingSettings CaseSensitive="False" />
            <ClientSettings>
              <Scrolling UseStaticHeaders="True" />
            </ClientSettings>
            <MasterTableView DataSourceID="SqlDataSource" Width="100%" DataKeyNames="FolderId,FolderName"
                CommandItemDisplay="Top">
                <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
                <Columns>
                    <telerik:GridButtonColumn ButtonType="ImageButton" CommandName="Delete" ConfirmText="Delete this document folder?"
                      ConfirmTitle="Delete" UniqueName="clDeleteButton">
                    </telerik:GridButtonColumn>
                    <telerik:GridEditCommandColumn ButtonType="ImageButton">
                    </telerik:GridEditCommandColumn>

                    <telerik:GridBoundColumn DataField="FolderName" HeaderText="Folder Name" SortExpression="FolderName" UniqueName="FolderName">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Prefix" HeaderText="Prefix" SortExpression="Prefix" UniqueName="Prefix">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="RightsCaption" HeaderText="Access Rights" SortExpression="RightsCaption" UniqueName="RightsCaption">
                    </telerik:GridBoundColumn>

                    <telerik:GridBoundColumn DataField="FolderId" DataType="System.Int32" HeaderText="FolderId"
                        SortExpression="FolderId" UniqueName="FolderId" Visible="False">
                    </telerik:GridBoundColumn>
                </Columns>
                <EditFormSettings EditFormType="WebUserControl" UserControlName="DocumentFolderEditControl.ascx">
                    <EditColumn UniqueName="EditCommandColumn1">
                    </EditColumn>
                </EditFormSettings>
                <PagerStyle AlwaysVisible="false" />
            </MasterTableView>
            <PagerStyle AlwaysVisible="false" />
        </telerik:RadGrid>
    </div>
</asp:Content>
